/*
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2022-08-17 17:24:44
 * @LastEditors: 陈妮娜 969682281@qq.com
 * @LastEditTime: 2024-10-31 10:41:00
 * @FilePath: \backstage\src\api\request.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import {
    req,
    reqNull,
    up,
    reqNulls,
    reqNull1,
} from '@/api/index';
let url = 'http://1.14.103.201:8300/IOTManagement/' //高信
// let url = 'http://192.168.0.02:8080/IOTManagement/' //孙猛本地
// let url = 'http://192.168.0.18:8300/IOTManagement/' //李康本地
// let url = 'http://192.168.0.20:8300/IOTManagement/' //嫣然/本地
// let url = 'http://192.168.0.44:8080/IOTManagement/' //韩磊/本地

// let url = 'https://xayj.limsapp.cn:8010/qualityManagementPlatform/' //正式
// 文件前缀
// var fileAnnexes = 'http://xayj.limsapp.cn:8301//fileAnnexes/';
// 上传附
export const upload = (res) => {
    return up("post", url + "App/upload/uploadFile.do", res)
}
//  登录
export const login = (res) => {
    return reqNull("post", url + "Base/User/loginWeb.do", res)
}
// 角色管理-列表页（分页）
export const getBaseRoleList = (res) => {
    return req("post", url + "Base/Role/getBaseRoleList.do", res)
}
// 试验软件接口--成都
// 取样登记 -5.获取检验对象属性
export const getSampleSxList = (res, header, trendsUrl) => {
    return reqNulls("get", trendsUrl + "cdkx/api/app/common/getSampleSxList?organId=" + res.organId +
        "&testTypeId=" + res.testTypeId, res, header)
}

// 取样登记 - 6.保存取样登记数据
export const register = (res, header, trendsUrl) => {
    return reqNulls("post", trendsUrl + "cdkx/api/app/sample/register", res, header)
}
// 试验软件接口--成都
// 打印
export const getPouringOrdersQRCode = (res) => {
    console.log('tttt',res);
    return reqNull1("get", url + "JZLGL/getPouringOrdersQRCode.do", res)
}
